import requests

s = requests.session()

r = s.get('https://localhost:8443/agileone/index.php', verify=False)
r.encoding = 'utf-8'
# print(r.text)

# 登陆
data = 'username=admin&password=admin&savelogin=true'
# data = {'username':'admin', 'password':'admin','savelogin':'true'}
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
r = s.post('http://localhost/agileone/index.php/common/login', data=data, headers=headers)
print(r.text)
